<template>
<h1>EL-单选组件</h1>
  <el-radio-group v-model="gender">
    <el-radio label="男" value="1"></el-radio>
    <el-radio label="女" value="2"></el-radio>
  </el-radio-group>
  <h4>您选的值为:{{ gender }}</h4>
  <hr>
  <el-radio-group v-model="edu">
    <el-radio-button label="学历:本科" value="bk"></el-radio-button>
    <el-radio-button label="学历:大专" value="dz"></el-radio-button>
    <el-radio-button label="学历:高中" value="gz"></el-radio-button>
    <el-radio-button label="学历:初中" value="cz"></el-radio-button>
  </el-radio-group>
  <h4>您选的学历为:{{ edu }}</h4>
  <hr>
  <el-radio-group v-model="pri">
    <el-radio-button v-for="p in arr" :label="p.title" :value="p.price"></el-radio-button>
  </el-radio-group>
  <h4>{{ pri }}</h4>
</template>
<script setup>
import {ref} from "vue";
const gender = ref("");
const edu = ref("bk");
const pri = ref("");
const arr = ref([
    {title:"五粮液",price:5000},
    {title:"茅台",price:2500},
    {title:"汾酒",price:330},
    {title:"梦之蓝",price:368}
]);
</script>


<style scoped>

</style>